FROM {{ namespace }}/{{ image_prefix }}magnum-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"

{% block magnum_conductor_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if install_type == 'binary' %}
    {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
        {% set magnum_conductor_packages = [
             'openstack-magnum-conductor'
         ] %}

    {% elif base_distro in ['debian', 'ubuntu'] %}
        {% set magnum_conductor_packages = [
             'magnum-conductor'
         ] %}

    {% endif %}
{{ macros.install_packages(magnum_conductor_packages | customizable("packages")) }}

{{ macros.install_kubectl() }}
{% endif %}

{% block magnum_conductor_footer %}{% endblock %}
{% block footer %}{% endblock %}

USER magnum
